package stripesbook.view;

import org.stripesbook.rayures.view.ViewObject;
import org.stripesbook.rayures.view.stripes.SLink;
import stripesbook.action.MockDataLoaderActionBean;
import stripesbook.action.user.folders.MessageListActionBean;

public class MessageListView extends ViewObject<MessageListView> {
  private MessageListActionBean actionBean;

  @Override
  public void onInit() {
    actionBean = (MessageListActionBean) getViewContext().getActionBean();
  }

  public Object getMessageListForm() {
    return tag(MessageListForm.class).folder(actionBean.getContext().getCurrentFolder());
  }

  public SLink getLoadMockMessagesLink() {
    return tag(SLink.class).beanclass(MockDataLoaderActionBean.class).event("loadMockMessages")
      .label(bundle.get("messageList.loadMockMessages"));
  }
}
